package JMU1.ti4;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
       while (scanner.hasNextLine()){
           String line = scanner.nextLine();
           int sum=0;
           for(char c:line.toCharArray()){
               if(Character.isDigit(c)){
                   sum+=c-'0';
               }
           }
           System.out.println(sum);
       }
    }
}
